Home:ALL Converter>Can concurrency issues occur when doing MySQL query update to value + 1?

Can concurrency issues occur when doing MySQL query update to value + 1?

Ask Time:2018-07-24T19:35:57         Author:rockstardev

Json Formatter

If I have the following SQL:

update clients set credits = credits - 1

If this is repeatedly executed, can there ever be a case where concurrency could occur. In other words, does MySQL cater for concurrency internally, or could this cause issues if the sql is executed concurrently by multiple parties?

Author:rockstardev,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/51497583/can-concurrency-issues-occur-when-doing-mysql-query-update-to-value-1
yy